<template>

 <el-table
         :data="dish"
         stripe
         style="width: 100%"

  >
  dish:{{dish}}
  <el-table-column
          prop="id"
          align="center"
          label="编号">

  </el-table-column>
  <el-table-column
          prop="name"
          align="center"
          label="菜名">
  </el-table-column>
  <el-table-column
          prop="price"
          align="center"
          label="价格">
  </el-table-column>
  <el-table-column
          prop="status"
          align="center"
          label="状态">
  </el-table-column>
  <el-table-column
          fixed="right"
          align="center"
          label="操作">
   <template slot-scope="scope">
    <el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>
    <el-button type="text" size="small">编辑</el-button>
   </template>
  </el-table-column>
 </el-table>
</template>

<script>
    export default {
        name: "dish",
        data(){
            return{
                dish: [{}],

            }
        },
        created() {
         this.test();
        },

     methods :{
            test(){
                this.$axios.get('/dish').then(resp=>{
                    this.dish = resp.data;
                 console.log(resp.data)
                })
            }
        }

    }
</script>

<style scoped>

</style>